package com.yanzq.dao.impl;

import cn.hutool.core.io.IoUtil;
import com.yanzq.dao.DataRead;

import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

public class DataReadImplements implements DataRead {

    @Override
    public List<String> readFile() {

        InputStream in = this.getClass().getResourceAsStream("/user.txt");
        List<String> result = IoUtil.readLines(in, StandardCharsets.UTF_8, new ArrayList<>());
        return result;
    }
}
